<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2016 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------

use think\Route;


//wj
//后台登录
Route::get('admin/login', 'admin/login/index');

//后台用户管理
Route::resource('users', 'admin/User');
//后台角色管理
Route::resource('roles','admin/Role');
//后台角色配置页面
Route::get('getnode','admin/Role/getnode');
//后台角色设置
Route::post('setnode','admin/role/setnode');
//后台节点管理
Route::resource('nodes','admin/Node');
//积分
Route::get('integral','index/integral/sum');

//wj





/**
 * 生成资源控制器路由(zmh)后台
 *
 */

/**
 * 生成房源环境资源的路由
 */
Route::resource('server','admin/Server');
/**
 * 生成友情链接的资源路由
 */
Route::resource('friend','admin/Friend');
/**
 * 生成广告栏位的资源路由
 */
Route::resource('advertising','admin/Advertisingby');







/**
 * 前台登陆 注册 首页路由（whp）
 */

// 前台首页路由
Route::get('/', 'index/index/index');
//注册页面路由
Route::get('reg', 'index/reg/index');
//登录页面路由
Route::get('prelogin', 'index/login/index');

/**
 * 前台手机验证发送(whp)
 */
Route::get('/sendSms', 'index/reg/sendSms');

//生成手机登录个人中心首页路由(whp 814)
Route::get('personcenter/indextel','index/personcenter/indextel');






/**
 * 生成商家资源路由(zmh)
 */
Route::resource('business', 'index/business');

//到后台找房源环境表的数据显现在js中
Route::post('business/ajax','index/business/ajax');

//商家发布房源请求地址联动路由
Route::get('business/address','index/business/address');

//商家发布房源信息验证联系人姓名
Route::post('business/linkname','index/business/linkname');

//通过联系人 user_id 获取房屋的详细信息路由 （用在查看我的房源）
Route::post('business/goodsdetail$','index/business/gooddetails');

//通过user_id 获取商家信息的详细路由（用来查看我的商家）前台
Route::get('business/godinfor','index/business/information');

//通过ajax删除商家信息 设置路由 (前台)
Route::post('business/deletegoods/:id','index/business/deletegoodsinfor');





/**
 * 生成个人中心首页路由（zmh）
 */

Route::get('personcenter/index','index/personcenter/index');
//修改个人资料路由(zmh)
Route::get('personcenter/edit','index/personcenter/edit');
//修改个人登陆密码路由
Route::get('personcenter/pass','index/personcenter/passindex');
//用ajax执行密码 验证 的具体操作
Route::post('personcenter/passcom','index/personcenter/passcommon');
//接受修改密码的数据,并提交到数据库
Route::post('personcenter/updatepass','index/personcenter/updatepass');






/**
 * 后台订单管理路由（whp）
 */
Route::get('order', 'admin/order/index');
//后台订单删除路由
Route::delete('order/:id', 'admin/order/delete');

//后台评论管理
Route::get('admincomment$', 'admin/comment/index');
//后台评论删除路由
Route::delete('admincomment/:id','admin/comment/delete');
//后台商家回复页面路由
Route::get('adminreplay/:id', 'admin/comment/create');
//后台商家回复路由
Route::post('savereply/:id', 'admin/comment/save');
//订单管理路由结束






/**
 * 退出登录 并且清除session(whp)
 */
Route::get('session', 'index/login/out');


/***
 * 前台提交订单路由(whp)
 */
Route::post('index/order/indexorder/:id', 'index/order/index');
//前台提交订单路由
Route::post('saveorder/:id', 'index/order/save');

/**
 * 前台订单管理页面路由(whp)
 */

Route::get('ordermanagement', 'index/Ordermanagement/index');

/**
 * 前台订单取消订单路由(whp 814)
 */
Route::delete('ordermanagement/:id', 'index/ordermanagement/delete');

/**
 * 前台订单支付房款路由(whp 814)
 */
Route::get('ordermanage/:id', 'index/ordermanagement/update');




/**
 * 前台评论管理页面路由(whp)
 */
Route::get('comment$', 'index/comment/index');
//商品评价页面路由(whp)
Route::get('commentlist/:id', 'index/comment/commentlist');
//商品发表评价路由
Route::post('comment/:id','index/comment/save');




/**
 * 后台导航分类路由(whp)
 */
Route::resource('classify', 'admin/Classify');



/**
 * 别墅分页路由（zmh）前台显示
 */
Route::get('index/villa$','index/villa/index');

/**
 * 房屋详情页路由
 */
Route::get('index/house/detail/:id','index/villa/detail');

/**
 * 房屋详情页请求ajax联系人电话
 */
Route::post('house/linkphone','index/villa/linkphone');

/**
 * 宾馆分页之路由
 */
Route::get('index/hotial$','index/villa/hotiallindex');

/**
 * 民房分页之路由
 */
Route::get('index/citizen$','index/villa/citizen');



/**
 * 后台对商家进行审核的路由
 */

Route::get('admin/goodsaudits','admin/goodsaudit/index');

/**
 * 通过ajax修改商家的审核状态
 */
Route::post('admin/goodajax','admin/goodsaudit/checkaudit');


/**
 *  后台对房源进行审核的路由
 */
Route::get('admin/housescheck','admin/goodsaudit/houselist');

/**
 * 通过ajax修改房源的审核状态
 */
Route::post('admin/houseajax','admin/goodsaudit/housechecks');




//收藏
Route::post('collects','index/collect/add');
//取消收藏
Route::post('collect','index/collect/del');




//  815------------------------------------------------------------------
